﻿using System.ComponentModel;
using CarAppDomain.Base;
using SqlSugar;

namespace CarAppDomain.Sys.Entities
{
    /// <summary>
    /// 管理员模型
    /// </summary>
    [SugarTable("SysAdmin",TableDescription = "管理员")]
    public class SysAdminEntity : BaseEntity
    {
        /// <summary>
        /// 工号
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 36, IsNullable = false, ColumnDescription = "工号")]
        public string? UUID { get; set; }

        /// <summary>
        /// 账号
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 18, IsNullable = false, ColumnDescription = "账号")]
        public string? Account { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 20, IsNullable = false, ColumnDescription = "密码")]
        public string? Pwd { get; set; }

        /// <summary>
        /// 昵称
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 30, IsNullable = true, ColumnDescription = "昵称")]
        public string? NickName { get; set; }


        /// <summary>
        /// 邮箱
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 30, IsNullable = true, ColumnDescription = "邮箱")]
        public string? Email { get; set; }

        /// <summary>
        /// 用户组ID
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 36, IsNullable = true, ColumnDescription = "用户组ID")]
        public string? UserGroupId { get; set; }

        /// <summary>
        /// 默认所属角色
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 36, IsNullable = true, ColumnDescription = "默认所属角色")]
        public string? RoleId { get; set; }

        /// <summary>
        /// 上次登录时间
        /// </summary>
        [SugarColumn(ColumnDataType = "dateTime",  IsNullable = true, ColumnDescription = "上次登录时间")]
        public DateTime? LastLoginTime { get; set; }

        /// <summary>
        /// 上次登录IP地址 
        /// </summar
        [SugarColumn(ColumnDataType = "varchar", Length = 20, IsNullable = true, ColumnDescription = "上次登录IP地址")]
        public string? LastLoginIp { get; set; }

        /// <summary>
        /// 登录总次数
        /// </summary>
        [SugarColumn(ColumnDataType = "int", IsNullable = true, ColumnDescription = "登录总次数")]
        public int? LoginTotalCount { get; set; }

        /// <summary>
        /// 是否推送信息
        /// </summary>
        [SugarColumn(ColumnDataType = "bit", IsNullable = false, ColumnDescription = "是否推送信息")]
        public bool? IsPush { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 500, IsNullable = true, ColumnDescription = "描述")]
        public string? Descption { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [SugarColumn(ColumnDataType = "bit", IsNullable = false, ColumnDescription = "状态")]
        public bool? Status { get; set; }
    }
}
